<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='查房记录-查房',cssPaths='/static/css/services/roundsrecord/rounds.css',jsPaths='/static/js/services/roundsrecord/rounds.js')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                    <a href="">护理管理</a>
                    <a href="/roundsRecord">查房记录</a>
                    <a><cite>查房</cite></a>
                </span>
    </div>

    <!--主体内容区-->
    <div class="form-content layui-container">
            <input type="hidden" name="recordId"  id="recordId" th:value="${recordId}">
                <table class="room-table">
                    <thead>
                    <tr>
                        <th style="width: 100px;">楼宇名称</th>
                        <th style="width: 100px;">楼层</th>
                        <th style="width: 600px;">房号</th>
                    </tr>
                    <!--<tr th:each="roomList:${roomList}">
                        <td hidden th:text="${roomList.buildingId}" id="buildingId"></td>
                        <td th:text="${roomList.buildingName}" id="buildingNo"></td>
                        <td th:text="${roomList.floor}" id="floor"></td>
                        <td>
                            <button class="layui-btn layui-btn-radius" disabled th:text="${roomList.code}" th:id="${roomList.id}" th:if="${#lists.contains(yizhuElderRooms, roomList.buildingName+'-'+roomList.code)} and ${#lists.contains(yichaRooms, roomList.buildingName+'-'+roomList.code)}" ></button>
                            <button class="layui-btn layui-btn-radius layui-btn-primary" th:text="${roomList.code}" th:id="${roomList.id}" th:if="${#lists.contains(yizhuElderRooms, roomList.buildingName+'-'+roomList.code)} and  !${#lists.contains(yichaRooms, roomList.buildingName+'-'+roomList.code)}" ></button>
                            <button class="layui-btn layui-btn-disabled layui-btn-radius" th:text="${roomList.code}" th:id="${roomList.id}" th:if="!${#lists.contains(yizhuElderRooms, roomList.buildingName+'-'+roomList.code)}" ></button>
                        </td>
                    </tr>-->
                    </thead>
                    <tbody>
                        <tr th:each="entry : ${buildingMap}">
                            <td th:text="${entry.key}" style="text-align: center"></td>
                            <td colspan="2" >
                                <div class="floor-box"  th:each="ientry,stat : ${entry.value}" th:style="${stat.last ? 'border-bottom:0' : ''}">
                                    <div th:text="${ientry.key}+' 层'" style="width: 100px;display: flex;align-items:center;justify-content:center;"></div>
                                    <div class="room-box">
                                        <div th:each="room:${ientry.value}" style="display: inline-block">
                                            <button th:attr="data-buildingid=${room.buildingId},data-buildingno=${room.buildingName},data-floor=${room.floor},data-roomno=${room.code}"   class="layui-btn layui-btn-radius" disabled th:text="${room.code}" th:id="${room.id}" th:if="${#lists.contains(yizhuElderRooms, room.buildingName+'-'+room.code)} and ${#lists.contains(yichaRooms, room.buildingName+'-'+room.code)}" ></button>
                                            <button th:attr="data-buildingid=${room.buildingId},data-buildingno=${room.buildingName},data-floor=${room.floor},data-roomno=${room.code}"   class="layui-btn layui-btn-radius layui-btn-primary" th:text="${room.code}" th:id="${room.id}" th:if="${#lists.contains(yizhuElderRooms, room.buildingName+'-'+room.code)} and  !${#lists.contains(yichaRooms, room.buildingName+'-'+room.code)}" ></button>
                                            <button th:attr="data-buildingid=${room.buildingId},data-buildingno=${room.buildingName},data-floor=${room.floor},data-roomno=${room.code}"   class="layui-btn layui-btn-disabled layui-btn-radius" th:text="${room.code}" th:id="${room.id}" th:if="!${#lists.contains(yizhuElderRooms, room.buildingName+'-'+room.code)}" ></button>
                                        </div>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="layui-form-item" style="margin-left: 515px;">
                <div class="layui-input-block">
                    <a href="javascript:void(0)" class="layui-btn" id="roundsEnd">查房结束</a>
                    <a href="/roundsRecord" class="layui-btn layui-btn-primary">返回</a>
                </div>
            </div>
</div>
</html>